package cn.wolfcode.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class LogoutController {

    @RequestMapping("/logout")
     private String logout(HttpServletRequest request){
         request.getSession().removeAttribute("USER");
        return "redirect:/login.html";
     }

}
